<?php
$con=new mysqli("127.0.0.1", "test", "12345", "scores");
if($con->connect_error){
	die('Could not connect:'. $con->connect_error);
}else{
	$con->set_charset("utf8");
	$result=$con->query("SELECT * FROM scorename");

	if($result){
		while($row=$result->fetch_assoc()){
			echo $row['name'] . " " . $row['score'];
			echo "<br />";
		}
		$result->free();
	}else{
		echo "Query error: " . $con->error;
	}
	$con->close();
}
?>
